Skip to content

Fix/4139 sharepoint license error spam - #4255

Open
falscherwiener1-svg wants to merge 1 commit into
elastic:mainfrom
falscherwiener1-svg:fix/4139-sharepoint-license-error-spam
Open

Fix/4139 sharepoint license error spam #4255
falscherwiener1-svg wants to merge 1 commit into
elastic:mainfrom
falscherwiener1-svg:fix/4139-sharepoint-license-error-spam

Conversation

@falscherwiener1-svg

Copy link
Copy Markdown

Closes https://github.com/elastic/connectors-py/issues/###

What

Only check the Elasticsearch license for access control sync scheduling when the user has actually enabled access control sync — not just because the connector supports DLS.

Closes #4139

Why

The scheduling loop calls document_level_security_enabled() which returns True for any connector that supports DLS (e.g. SharePoint Online). On a Basic license this logs an ERROR every ~30s:

Minimum required Elasticsearch license: 'platinum'. Actual license: 'basic'. Skipping access control sync scheduling...

This is misleading when the user never enabled access control sync. The error should only appear when someone explicitly enables it without having the right license.

Fix

Added connector.access_control_sync_scheduling.get("enabled", False) as an additional condition before entering the license check.

Checklist

  • Unit tests pass
  • Changelog not needed (fix not yet released)

Release Note

@artem-shelkovnikov

Copy link
Copy Markdown
Member
  1. You've changed our default PR template to your own, removing all checklists, why?
  2. The PR contains 355 lines of changes most of which do not seem related. Is it intended?

…led (elastic#4139)

The scheduling loop logs an ERROR every ~30s when a connector
supports DLS but the Elasticsearch license is not Platinum.
This is misleading when the user has not enabled access control
sync at all.

Only check the license when access control sync scheduling is
actually enabled by the user. If it's disabled, skip silently.
@falscherwiener1-svg
falscherwiener1-svg force-pushed the fix/4139-sharepoint-license-error-spam branch from 689ab90 to a0e6949 Compare July 23, 2026 13:14
@falscherwiener1-svg

Copy link
Copy Markdown
Author

Sorry for the mixed commits.(english is not my first language) that was a branch-management mistake on my end. I've force-pushed the branch to contain only the actual fix (1 commit, 2 files, +71 −1 lines).

What changed: The guard connector.access_control_sync_scheduling.get("enabled", False) now runs before the license check, so the "Minimum required Elasticsearch license: 'platinum'…" error is no longer logged every ~30s on Basic licenses when the user never enabled access-control sync.

New: Added regression test test_connector_scheduled_access_control_sync_with_sync_disabled — it fails without the fix (license gets checked, error logged) and passes with it (has_active_license_enabled.assert_not_awaited()). The #4139 scenario is now automated.

Please re-review thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SharePoint Online] Connector produces license error even if we don't use that features

2 participants